package com.yxjx.duoxue.datamodel;

import java.util.ArrayList;
import java.util.List;

import com.yxjx.duoxue.course.datamodel.AdListDTS;
import com.yxjx.duoxue.utils.JsonUtils;
import com.yxjx.duoxue.utils.UIHelper;

public class RushDTS {

    // 模块标题
    private String hot = "";
    // 抢购起始时间13位，可精确到微秒
    private Long startTime = 0l;
    // 抢购结束时间13位，可精确到微秒
    private Long endTime = 0l;
    // 参加抢购课程
    private List<AdListDTS> list = new ArrayList<AdListDTS>();
    // 列表页标题，可用于分享
    private String title = "";
    // 列表页描述，可用于分享
    private String des = "";
    // 列表页url，可用于分享
    private String url = "";

    public String getHot() {
        return hot;
    }

    public void setHot(String hot) {
        this.hot = hot;
    }

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public List<AdListDTS> getList() {
        return list;
    }

    public void setList(List<AdListDTS> list) {
        this.list = list;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDes() {
        return des;
    }

    public void setDes(String des) {
        this.des = des;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Override
    public String toString() {
        return "{\"hot\":\"" + hot + "\", \"startTime\":\"" + startTime + "\", \"endTime\":\"" + endTime + "\", \"list\":\"" + list + "\", \"title\":\"" + title
                + "\", \"des\":\"" + des + "\", \"url\":\"" + url + "\"}";
    }
    
    public static RushDTS from(String jsonStr) {
    	return JsonUtils.toJavaBean(jsonStr, RushDTS.class);
    }
}
